package com.ccc.scala.base6_object

object Object10_Instance {
  def main(args: Array[String]): Unit = {
    // 类型检查和转换
    val person = new Person()

    // 判断对象是否为某个类型的实例
    val bool = person.isInstanceOf[Person]

    if (bool) {
      val p1: Person = person.asInstanceOf[Person]
      println(p1)
    }
  }

  class Person {

  }
}
